// 保存token
const TokenKey = 'heima-toutiao'
const saveToken = tokenObj => {
  localStorage.setItem(TokenKey, JSON.stringify(tokenObj))
}
// 删除token
const deleteToken = () => {
  localStorage.removeItem(TokenKey)
}
// 获取token

const getToken = () => {
  return JSON.parse(localStorage.getItem(TokenKey))
}

export { saveToken, deleteToken, getToken }
